// Copyright (c) 2018 Muhammad M. Imtiaz

// This Work is subject to the terms of the Universal Permissive License,
// Version 1.0. If a copy of the licence was not distributed with this Work,
// you can obtain one at <https://oss.oracle.com/licenses/upl/>.

public class BMR {
    
    public static void main(String[] args) {
	java.util.Scanner input = new java.util.Scanner(System.in);
	String name;
	String gender;
	int age;
	int heightInches;
	int weightPounds;
	double heightCm;
	double weightKg;
	double BMR;

	System.out.print("Enter your name: ");
	name = input.nextLine();
	System.out.print("Gender (M or F): ");
	gender = input.next();
	System.out.print("Enter your age: ");
	age = input.nextInt();
	System.out.print("Height in inches: ");
	heightInches = input.nextInt();
	System.out.print("Weight in pounds: ");
	weightPounds = input.nextInt();

	heightCm = heightInches * 2.54;
	weightKg = weightPounds * 0.45359237;

	BMR = 10 * weightKg + 6.25 * heightCm;

	if(gender.toUpperCase() == "M")
	    BMR += 5;
	else
	    BMR -= 161;

	System.out.println("Name: " + name);
	System.out.println("Gender:" + gender);
	System.out.println("Age: " + age);
	System.out.println("Weight (kg): " + weightKg);
	System.out.println("Height (cm): " + heightCm);
	System.out.println("Basal Metabolic Rate: " + BMR + " calories per day");
    }
    
}
